﻿// MmorpgServer.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
#include<string>
#include"GameServer.h"
#include<typeinfo>
#include"dbconnect/DBDao.h"
#include"dbconnect/Model.h"

using namespace Net;
using namespace std;

int main()
{
    GameServer* server = new GameServer();
    if (server->StartServer(NULL, NULL, 8083, MODE_IOCP))
    {
        cout << "开启服务器成功 IP:" << server->GetHostIPs().begin()->c_str() << " 端口：" << 8083 << endl;
    }
    else
    {
        cout << "开启服务器失败:" << server->GetLastError() << endl;
    }
    server->initMaster();
    server->StartAnscMessageProc();
    server->mainLoop();
    delete server;
    server = nullptr;
}
